﻿using DataWorks_Sqlite.MappingClass;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataWorks_Sqlite.MappingClassConfig
{
    internal class dw_props_admin_config : IEntityTypeConfiguration<dw_props_admin>
    {
        public void Configure(EntityTypeBuilder<dw_props_admin> builder)
        {
            builder.ToTable("dw_props_admin");
            builder.HasKey(b => b.key);
            builder.Property(a => a.clean_numreg).HasMaxLength(255).IsRequired();
            builder.Property(a => a.clean_stringreg).HasMaxLength(64).IsRequired();
            builder.Property(a => a.spike_meanpoints).HasColumnType("INTEGER").IsRequired();
            builder.Property(a => a.spike_vairancepoints).HasColumnType("INTEGER").IsRequired();
            builder.Property(a => a.spike_threadspercentage).HasColumnType("REAL").IsRequired();
            builder.Property(a => a.spike_ratio).HasColumnType("REAL").IsRequired();

            builder.Property(a => a.mileagebasis).HasColumnType("INTEGER").IsRequired();
            builder.Property(a => a.cleanthreadnumber).HasColumnType("INTEGER").IsRequired();
            builder.Property(a => a.ismultithreads).HasColumnType("INTEGER").IsRequired();

            builder.Property(a => a.samplerate).HasColumnType("INTEGER").IsRequired();
            builder.Property(a => a.gpsreductiontimes).HasColumnType("INTEGER").IsRequired();
            builder.Property(a => a.lastingpoints).HasColumnType("INTEGER").IsRequired();
            builder.Property(a => a.throttlezerostandard).HasColumnType("INTEGER").IsRequired();
            builder.Property(a => a.steeringzerostandard).HasColumnType("INTEGER").IsRequired();
            builder.Property(a => a.predictthreadnumber).HasColumnType("INTEGER").IsRequired();
            builder.Property(a => a.spdfromtoresamplerate).HasColumnType("INTEGER").IsRequired();
            builder.Property(a => a.binnumber).HasColumnType("INTEGER").IsRequired();
        }
    }
}
